home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nejlepší hry
/
Nejlepsi hry.iso
/
hry
/
sea of chaos
/
sea_install.msi
/
_15C39AAA7726369D39812BD40F01CF6A
/
_9FFFBDE205EA410CB2CF6624D4891893
< prev
next >
Wrap
Text File
|
2004-11-14
|
702b
|
38 lines
//rain cylendar pixel shader:
//mixes color of 2 layers of rain linearly
//Luke Lenhart
//(C)2004-2005 Digipen Institute of Technology
//blend factor between 2 layers
float blend;
//layer 0 sampler
sampler2D sampRain0;
//layer 1 sampler
sampler2D sampRain1;
//shader input
struct PS_INPUT
{
float4 Color : COLOR;
float2 Tex0 : TEXCOORD0;
};
//shader code
float4 PShader(PS_INPUT In) : COLOR
{
//sample textutes
float4 rain0=tex2D(sampRain0,In.Tex0);
float4 rain1=tex2D(sampRain1,In.Tex0);
//simple blend of samples
float4 clr=lerp(rain0,rain1,blend);
//apply vert color
clr*=In.Color;
//spit out color
return clr;
}